<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for class.smtp.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file class.smtp.php</h1>
<p>Documentation is available at <a href="../PHPMailer/_v2.0.4_PHPMailer_v2.0.4_class_smtp_php.html">class.smtp.php</a></p>
<div class="src-code">
<pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-comm">/*~ class.smtp.php</span></li>
<li><a name="a3"></a><span class="src-comm">.---------------------------------------------------------------------------.</span></li>
<li><a name="a4"></a><span class="src-comm">|  Software: PHPMailer - PHP email class                                    |</span></li>
<li><a name="a5"></a><span class="src-comm">|   Version: 2.0.4                                                          |</span></li>
<li><a name="a6"></a><span class="src-comm">|   Contact: via sourceforge.net support pages (also www.codeworxtech.com)  |</span></li>
<li><a name="a7"></a><span class="src-comm">|      Info: http://phpmailer.sourceforge.net                               |</span></li>
<li><a name="a8"></a><span class="src-comm">|   Support: http://sourceforge.net/projects/phpmailer/                     |</span></li>
<li><a name="a9"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a10"></a><span class="src-comm">|    Author: Andy Prevost (project admininistrator)                         |</span></li>
<li><a name="a11"></a><span class="src-comm">|    Author: Brent R. Matzelle (original founder)                           |</span></li>
<li><a name="a12"></a><span class="src-comm">| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved.               |</span></li>
<li><a name="a13"></a><span class="src-comm">| Copyright (c) 2001-2003, Brent R. Matzelle                                |</span></li>
<li><a name="a14"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a15"></a><span class="src-comm">|   License: Distributed under the Lesser General Public License (LGPL)     |</span></li>
<li><a name="a16"></a><span class="src-comm">|            http://www.gnu.org/copyleft/lesser.html                        |</span></li>
<li><a name="a17"></a><span class="src-comm">| This program is distributed in the hope that it will be useful - WITHOUT  |</span></li>
<li><a name="a18"></a><span class="src-comm">| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |</span></li>
<li><a name="a19"></a><span class="src-comm">| FITNESS FOR A PARTICULAR PURPOSE.                                         |</span></li>
<li><a name="a20"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a21"></a><span class="src-comm">| We offer a number of paid services (www.codeworxtech.com):                |</span></li>
<li><a name="a22"></a><span class="src-comm">| - Web Hosting on highly optimized fast and secure servers                 |</span></li>
<li><a name="a23"></a><span class="src-comm">| - Technology Consulting                                                   |</span></li>
<li><a name="a24"></a><span class="src-comm">| - Oursourcing (highly qualified programmers and graphic designers)        |</span></li>
<li><a name="a25"></a><span class="src-comm">'---------------------------------------------------------------------------'</span></li>
<li><a name="a26"></a>&nbsp;</li>
<li><a name="a25"></a>&nbsp;</li>
<li><a name="a26"></a>&nbsp;</li>
<li><a name="a27"></a><span class="src-doc">/**</span></li>
<li><a name="a28"></a><span class="src-doc"> * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP</span></li>
<li><a name="a29"></a><span class="src-doc"> * commands except TURN which will always return a not implemented</span></li>
<li><a name="a30"></a><span class="src-doc"> * error. SMTP also provides some utility methods for sending mail</span></li>
<li><a name="a31"></a><span class="src-doc"> * to an SMTP server.</span></li>
<li><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> PHPMailer</span></li>
<li><a name="a33"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Chris Ryan</span></li>
<li><a name="a34"></a><span class="src-doc"> */</span></li>
<li><a name="a35"></a>&nbsp;</li>
<li><a name="a36"></a><span class="src-key">class </span><a href="../PHPMailer/SMTP.html">SMTP</a></li>
<li><a name="a37"></a><span class="src-sym">{</span></li>
<li><a name="a38"></a>  <span class="src-doc">/**</span></li>
<li><a name="a39"></a><span class="src-doc">   *  SMTP server port</span></li>
<li><a name="a40"></a><span class="src-doc">   *  </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></li>
<li><a name="a41"></a><span class="src-doc">   */</span></li>
<li><a name="a42"></a>  <span class="src-key">var </span><a href="../PHPMailer/SMTP.html#var$SMTP_PORT">$SMTP_PORT</a> = <span class="src-num">25</span><span class="src-sym">;</span></li>
<li><a name="a43"></a>&nbsp;</li>
<li><a name="a44"></a>  <span class="src-doc">/**</span></li>
<li><a name="a45"></a><span class="src-doc">   *  SMTP reply line ending</span></li>
<li><a name="a46"></a><span class="src-doc">   *  </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a47"></a><span class="src-doc">   */</span></li>
<li><a name="a48"></a>  <span class="src-key">var </span><a href="../PHPMailer/SMTP.html#var$CRLF">$CRLF</a> = <span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a49"></a>&nbsp;</li>
<li><a name="a50"></a>  <span class="src-doc">/**</span></li>
<li><a name="a51"></a><span class="src-doc">   *  Sets whether debugging is turned on</span></li>
<li><a name="a52"></a><span class="src-doc">   *  </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a53"></a><span class="src-doc">   */</span></li>
<li><a name="a54"></a>  <span class="src-key">var </span><a href="../PHPMailer/SMTP.html#var$do_debug">$do_debug</a><span class="src-sym">;       </span><span class="src-comm"># the level of debug to perform</span></li>
<li><a name="a55"></a>&nbsp;</li>
<li><a name="a54"></a>  </li>
<li><a name="a55"></a>&nbsp;</li>
<li><a name="a56"></a>  <span class="src-doc">/**</span></li>
<li><a name="a57"></a><span class="src-doc">   *  Sets VERP use on/off (default is off)</span></li>
<li><a name="a58"></a><span class="src-doc">   *  </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a59"></a><span class="src-doc">   */</span></li>
<li><a name="a60"></a>  <span class="src-key">var </span><a href="../PHPMailer/SMTP.html#var$do_verp">$do_verp</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a61"></a>&nbsp;</li>
<li><a name="a62"></a>  <span class="src-doc-template">/**#@+</span></li>
<li><a name="a63"></a><span class="src-doc-template">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc-template"> private</span></li>
<li><a name="a64"></a><span class="src-doc-template">   */</span></li>
<li><a name="a65"></a>  <span class="src-key">var </span><span class="src-var">$smtp_conn</span><span class="src-sym">;      </span><span class="src-comm"># the socket to the server</span></li>
<li><a name="a65"></a>  </li>
<li><a name="a66"></a>  <span class="src-key">var </span><span class="src-var">$error</span><span class="src-sym">;          </span><span class="src-comm"># error if any on the last call</span></li>
<li><a name="a66"></a>  </li>
<li><a name="a67"></a>  <span class="src-key">var </span><span class="src-var">$helo_rply</span><span class="src-sym">;      </span><span class="src-comm"># the reply the server sent to us for HELO</span></li>
<li><a name="a67"></a>  </li>
<li><a name="a68"></a>  <span class="src-doc-close-template">/**#@-*/</span></li>
<li><a name="a69"></a>&nbsp;</li>
<li><a name="a70"></a>  <span class="src-doc">/**</span></li>
<li><a name="a71"></a><span class="src-doc">   * Initialize the class so that the data is in a known state.</span></li>
<li><a name="a72"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a73"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a74"></a><span class="src-doc">   */</span></li>
<li><a name="a75"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodSMTP">SMTP</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a76"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a77"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a78"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">helo_rply </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a79"></a>&nbsp;</li>
<li><a name="a80"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> = <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a81"></a>  <span class="src-sym">}</span></li>
<li><a name="a82"></a>&nbsp;</li>
<li><a name="a83"></a>  <span class="src-doc">/***********************************************************</span></li>
<li><a name="a84"></a><span class="src-doc">   *                    CONNECTION FUNCTIONS                  *</span></li>
<li><a name="a85"></a><span class="src-doc">   ***********************************************************/</span></li>
<li><a name="a85"></a>&nbsp;</li>
<li><a name="a86"></a>&nbsp;</li>
<li><a name="a87"></a>  <span class="src-doc">/**</span></li>
<li><a name="a88"></a><span class="src-doc">   * Connect to the server specified on the port specified.</span></li>
<li><a name="a89"></a><span class="src-doc">   * If the port is not specified use the default SMTP_PORT.</span></li>
<li><a name="a90"></a><span class="src-doc">   * If tval is specified then a connection will try and be</span></li>
<li><a name="a91"></a><span class="src-doc">   * established with the server for that number of seconds.</span></li>
<li><a name="a92"></a><span class="src-doc">   * If tval is not specified the default is 30 seconds to</span></li>
<li><a name="a93"></a><span class="src-doc">   * try on the connection.</span></li>
<li><a name="a94"></a><span class="src-doc">   *</span></li>
<li><a name="a95"></a><span class="src-doc">   * SMTP CODE SUCCESS: 220</span></li>
<li><a name="a96"></a><span class="src-doc">   * SMTP CODE FAILURE: 421</span></li>
<li><a name="a97"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a98"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a99"></a><span class="src-doc">   */</span></li>
<li><a name="a100"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodConnect">Connect</a><span class="src-sym">(</span><span class="src-var">$host</span><span class="src-sym">,</span><span class="src-var">$port</span>=<span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$tval</span>=<span class="src-num">30</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a101"></a>    <span class="src-comm"># set the error val to null so there is no confusion</span></li>
<li><a name="a102"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a103"></a>&nbsp;</li>
<li><a name="a104"></a>    <span class="src-comm"># make sure we are __not__ connected</span></li>
<li><a name="a105"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a106"></a>      <span class="src-comm"># ok we are connected! what should we do?</span></li>
<li><a name="a107"></a>      <span class="src-comm"># for now we will just give an error saying we</span></li>
<li><a name="a108"></a>      <span class="src-comm"># are already connected</span></li>
<li><a name="a109"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Already connected to a server&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a110"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a111"></a>    <span class="src-sym">}</span></li>
<li><a name="a112"></a>&nbsp;</li>
<li><a name="a113"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$port</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a114"></a>      <span class="src-var">$port </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$SMTP_PORT">SMTP_PORT</a><span class="src-sym">;</span></li>
<li><a name="a115"></a>    <span class="src-sym">}</span></li>
<li><a name="a116"></a>&nbsp;</li>
<li><a name="a117"></a>    <span class="src-comm">#connect to the smtp server</span></li>
<li><a name="a118"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn </span>= <a href="http://www.php.net/fsockopen">fsockopen</a><span class="src-sym">(</span><span class="src-var">$host</span><span class="src-sym">,    </span><span class="src-comm"># the host of the server</span></li>
<li><a name="a119"></a>                                 <span class="src-var">$port</span><span class="src-sym">,    </span><span class="src-comm"># the port to use</span></li>
<li><a name="a120"></a>                                 <span class="src-var">$errno</span><span class="src-sym">,   </span><span class="src-comm"># error number if any</span></li>
<li><a name="a121"></a>                                 <span class="src-var">$errstr</span><span class="src-sym">,  </span><span class="src-comm"># error message if any</span></li>
<li><a name="a122"></a>                                 <span class="src-var">$tval</span><span class="src-sym">)</span><span class="src-sym">;   </span><span class="src-comm"># give up after ? secs</span></li>
<li><a name="a123"></a>    <span class="src-comm"># verify we connected properly</span></li>
<li><a name="a124"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a125"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Failed to connect to server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a126"></a>                           <span class="src-str">&quot;errno&quot; </span>=&gt; <span class="src-var">$errno</span><span class="src-sym">,</span></li>
<li><a name="a127"></a>                           <span class="src-str">&quot;errstr&quot; </span>=&gt; <span class="src-var">$errstr</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a128"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a129"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a130"></a>                 <span class="src-str">&quot;</span><span class="src-str">: <span class="src-var">$errstr</span> (<span class="src-var">$errno</span>)</span><span class="src-str">&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a131"></a>      <span class="src-sym">}</span></li>
<li><a name="a132"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a133"></a>    <span class="src-sym">}</span></li>
<li><a name="a134"></a>&nbsp;</li>
<li><a name="a135"></a>    <span class="src-comm"># sometimes the SMTP server takes a little longer to respond</span></li>
<li><a name="a136"></a>    <span class="src-comm"># so we will give it a longer timeout for the first read</span></li>
<li><a name="a137"></a>    <span class="src-comm">// Windows still does not have support for this timeout function</span></li>
<li><a name="a138"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-id">PHP_OS</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">3</span><span class="src-sym">) </span>!= <span class="src-str">&quot;WIN&quot;</span><span class="src-sym">)</span></li>
<li><a name="a139"></a>     <a href="http://www.php.net/socket_set_timeout">socket_set_timeout</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">, </span><span class="src-var">$tval</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a140"></a>&nbsp;</li>
<li><a name="a141"></a>    <span class="src-comm"># get any announcement stuff</span></li>
<li><a name="a142"></a>    <span class="src-var">$announce </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a143"></a>&nbsp;</li>
<li><a name="a144"></a>    <span class="src-comm"># set the timeout  of any socket functions at 1/10 of a second</span></li>
<li><a name="a145"></a>    <span class="src-comm">//if(function_exists(&quot;socket_set_timeout&quot;))</span></li>
<li><a name="a146"></a>    <span class="src-comm">//   socket_set_timeout($this-&gt;smtp_conn, 0, 100000);</span></li>
<li><a name="a147"></a>&nbsp;</li>
<li><a name="a148"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a149"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$announce</span><span class="src-sym">;</span></li>
<li><a name="a150"></a>    <span class="src-sym">}</span></li>
<li><a name="a151"></a>&nbsp;</li>
<li><a name="a152"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a153"></a>  <span class="src-sym">}</span></li>
<li><a name="a154"></a>&nbsp;</li>
<li><a name="a155"></a>  <span class="src-doc">/**</span></li>
<li><a name="a156"></a><span class="src-doc">   * Performs SMTP authentication.  Must be run after running the</span></li>
<li><a name="a157"></a><span class="src-doc">   * Hello() method.  Returns true if successfully authenticated.</span></li>
<li><a name="a158"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a159"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a160"></a><span class="src-doc">   */</span></li>
<li><a name="a161"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodAuthenticate">Authenticate</a><span class="src-sym">(</span><span class="src-var">$username</span><span class="src-sym">, </span><span class="src-var">$password</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a162"></a>    <span class="src-comm">// Start authentication</span></li>
<li><a name="a163"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;AUTH LOGIN&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a164"></a>&nbsp;</li>
<li><a name="a165"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a166"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a167"></a>&nbsp;</li>
<li><a name="a168"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">334</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a169"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a170"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;AUTH not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a171"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a172"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a173"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a174"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a175"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a176"></a>      <span class="src-sym">}</span></li>
<li><a name="a177"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a178"></a>    <span class="src-sym">}</span></li>
<li><a name="a179"></a>&nbsp;</li>
<li><a name="a180"></a>    <span class="src-comm">// Send encoded username</span></li>
<li><a name="a181"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">, </span><a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><span class="src-var">$username</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a182"></a>&nbsp;</li>
<li><a name="a183"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a184"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a185"></a>&nbsp;</li>
<li><a name="a186"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">334</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a187"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a188"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Username not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a189"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a190"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a191"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a192"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a193"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a194"></a>      <span class="src-sym">}</span></li>
<li><a name="a195"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a196"></a>    <span class="src-sym">}</span></li>
<li><a name="a197"></a>&nbsp;</li>
<li><a name="a198"></a>    <span class="src-comm">// Send encoded password</span></li>
<li><a name="a199"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">, </span><a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><span class="src-var">$password</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a200"></a>&nbsp;</li>
<li><a name="a201"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a202"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a203"></a>&nbsp;</li>
<li><a name="a204"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">235</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a205"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a206"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Password not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a207"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a208"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a209"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a210"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a211"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a212"></a>      <span class="src-sym">}</span></li>
<li><a name="a213"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a214"></a>    <span class="src-sym">}</span></li>
<li><a name="a215"></a>&nbsp;</li>
<li><a name="a216"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a217"></a>  <span class="src-sym">}</span></li>
<li><a name="a218"></a>&nbsp;</li>
<li><a name="a219"></a>  <span class="src-doc">/**</span></li>
<li><a name="a220"></a><span class="src-doc">   * Returns true if connected to a server otherwise false</span></li>
<li><a name="a221"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a222"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a223"></a><span class="src-doc">   */</span></li>
<li><a name="a224"></a>  <span class="src-key">function </span><span class="src-id">Connected</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a225"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a226"></a>      <span class="src-var">$sock_status </span>= <a href="http://www.php.net/socket_get_status">socket_get_status</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a227"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$sock_status</span><span class="src-sym">[</span><span class="src-str">&quot;eof&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a228"></a>        <span class="src-comm"># hmm this is an odd situation... the socket is</span></li>
<li><a name="a229"></a>        <span class="src-comm"># valid but we are not connected anymore</span></li>
<li><a name="a230"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a231"></a>            echo <span class="src-str">&quot;SMTP -&gt; NOTICE:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> .</li>
<li><a name="a232"></a>                 <span class="src-str">&quot;EOF caught while checking if connected&quot;</span><span class="src-sym">;</span></li>
<li><a name="a233"></a>        <span class="src-sym">}</span></li>
<li><a name="a234"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#methodClose">Close</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a235"></a>        <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a236"></a>      <span class="src-sym">}</span></li>
<li><a name="a237"></a>      <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">; </span><span class="src-comm"># everything looks good</span></li>
<li><a name="a238"></a>    <span class="src-sym">}</span></li>
<li><a name="a239"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a240"></a>  <span class="src-sym">}</span></li>
<li><a name="a241"></a>&nbsp;</li>
<li><a name="a242"></a>  <span class="src-doc">/**</span></li>
<li><a name="a243"></a><span class="src-doc">   * Closes the socket and cleans up the state of the class.</span></li>
<li><a name="a244"></a><span class="src-doc">   * It is not considered good to use this function without</span></li>
<li><a name="a245"></a><span class="src-doc">   * first trying to use QUIT.</span></li>
<li><a name="a246"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a247"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a248"></a><span class="src-doc">   */</span></li>
<li><a name="a249"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodClose">Close</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a250"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so there is no confusion</span></li>
<li><a name="a251"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">helo_rply </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a252"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a253"></a>      <span class="src-comm"># close the connection and cleanup</span></li>
<li><a name="a254"></a>      <a href="http://www.php.net/fclose">fclose</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a255"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a256"></a>    <span class="src-sym">}</span></li>
<li><a name="a257"></a>  <span class="src-sym">}</span></li>
<li><a name="a258"></a>&nbsp;</li>
<li><a name="a259"></a>  <span class="src-doc">/*************************************************************</span></li>
<li><a name="a260"></a><span class="src-doc">   *                        SMTP COMMANDS                       *</span></li>
<li><a name="a261"></a><span class="src-doc">   *************************************************************/</span></li>
<li><a name="a261"></a>&nbsp;</li>
<li><a name="a262"></a>&nbsp;</li>
<li><a name="a263"></a>  <span class="src-doc">/**</span></li>
<li><a name="a264"></a><span class="src-doc">   * Issues a data command and sends the msg_data to the server</span></li>
<li><a name="a265"></a><span class="src-doc">   * finializing the mail transaction. $msg_data is the message</span></li>
<li><a name="a266"></a><span class="src-doc">   * that is to be send with the headers. Each header needs to be</span></li>
<li><a name="a267"></a><span class="src-doc">   * on a single line followed by a &lt;CRLF&gt; with the message headers</span></li>
<li><a name="a268"></a><span class="src-doc">   * and the message body being seperated by and additional &lt;CRLF&gt;.</span></li>
<li><a name="a269"></a><span class="src-doc">   *</span></li>
<li><a name="a270"></a><span class="src-doc">   * Implements rfc 821: DATA &lt;CRLF&gt;</span></li>
<li><a name="a271"></a><span class="src-doc">   *</span></li>
<li><a name="a272"></a><span class="src-doc">   * SMTP CODE INTERMEDIATE: 354</span></li>
<li><a name="a273"></a><span class="src-doc">   *     [data]</span></li>
<li><a name="a274"></a><span class="src-doc">   *     &lt;CRLF&gt;.&lt;CRLF&gt;</span></li>
<li><a name="a275"></a><span class="src-doc">   *     SMTP CODE SUCCESS: 250</span></li>
<li><a name="a276"></a><span class="src-doc">   *     SMTP CODE FAILURE: 552,554,451,452</span></li>
<li><a name="a277"></a><span class="src-doc">   * SMTP CODE FAILURE: 451,554</span></li>
<li><a name="a278"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,503,421</span></li>
<li><a name="a279"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a280"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a281"></a><span class="src-doc">   */</span></li>
<li><a name="a282"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodData">Data</a><span class="src-sym">(</span><span class="src-var">$msg_data</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a283"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a284"></a>&nbsp;</li>
<li><a name="a285"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a286"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a287"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Data() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a288"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a289"></a>    <span class="src-sym">}</span></li>
<li><a name="a290"></a>&nbsp;</li>
<li><a name="a291"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;DATA&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a292"></a>&nbsp;</li>
<li><a name="a293"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a294"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a295"></a>&nbsp;</li>
<li><a name="a296"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a297"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a298"></a>    <span class="src-sym">}</span></li>
<li><a name="a299"></a>&nbsp;</li>
<li><a name="a300"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">354</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a301"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a302"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;DATA command not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a303"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a304"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a305"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a306"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a307"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a308"></a>      <span class="src-sym">}</span></li>
<li><a name="a309"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a310"></a>    <span class="src-sym">}</span></li>
<li><a name="a311"></a>&nbsp;</li>
<li><a name="a312"></a>    <span class="src-comm"># the server is ready to accept data!</span></li>
<li><a name="a313"></a>    <span class="src-comm"># according to rfc 821 we should not send more than 1000</span></li>
<li><a name="a314"></a>    <span class="src-comm"># including the CRLF</span></li>
<li><a name="a315"></a>    <span class="src-comm"># characters on a single line so we will break the data up</span></li>
<li><a name="a316"></a>    <span class="src-comm"># into lines by \r and/or \n then if needed we will break</span></li>
<li><a name="a317"></a>    <span class="src-comm"># each of those into smaller lines to fit within the limit.</span></li>
<li><a name="a318"></a>    <span class="src-comm"># in addition we will be looking for lines that start with</span></li>
<li><a name="a319"></a>    <span class="src-comm"># a period '.' and append and additional period '.' to that</span></li>
<li><a name="a320"></a>    <span class="src-comm"># line. NOTE: this does not count towards are limit.</span></li>
<li><a name="a321"></a>&nbsp;</li>
<li><a name="a322"></a>    <span class="src-comm"># normalize the line breaks so we know the explode works</span></li>
<li><a name="a323"></a>    <span class="src-var">$msg_data </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">,</span><span class="src-var">$msg_data</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a324"></a>    <span class="src-var">$msg_data </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">,</span><span class="src-var">$msg_data</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a325"></a>    <span class="src-var">$lines </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">,</span><span class="src-var">$msg_data</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a326"></a>&nbsp;</li>
<li><a name="a327"></a>    <span class="src-comm"># we need to find a good way to determine is headers are</span></li>
<li><a name="a328"></a>    <span class="src-comm"># in the msg_data or if it is a straight msg body</span></li>
<li><a name="a329"></a>    <span class="src-comm"># currently I am assuming rfc 822 definitions of msg headers</span></li>
<li><a name="a330"></a>    <span class="src-comm"># and if the first field of the first line (':' sperated)</span></li>
<li><a name="a331"></a>    <span class="src-comm"># does not contain a space then it _should_ be a header</span></li>
<li><a name="a332"></a>    <span class="src-comm"># and we can process all lines before a blank &quot;&quot; line as</span></li>
<li><a name="a333"></a>    <span class="src-comm"># headers.</span></li>
<li><a name="a334"></a>    <span class="src-var">$field </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-str">&quot;:&quot;</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a335"></a>    <span class="src-var">$in_headers </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a336"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><a href="http://www.php.net/strstr">strstr</a><span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">,</span><span class="src-str">&quot; &quot;</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a337"></a>      <span class="src-var">$in_headers </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a338"></a>    <span class="src-sym">}</span></li>
<li><a name="a339"></a>&nbsp;</li>
<li><a name="a340"></a>    <span class="src-var">$max_line_length </span>= <span class="src-num">998</span><span class="src-sym">; </span><span class="src-comm"># used below; set here for ease in change</span></li>
<li><a name="a341"></a>&nbsp;</li>
<li><a name="a342"></a>    <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">,</span><span class="src-var">$line</span><span class="src-sym">) </span>= <span class="src-sym">@</span><a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a343"></a>      <span class="src-var">$lines_out </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a344"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$line </span>== <span class="src-str">&quot;&quot; </span>&amp;&amp; <span class="src-var">$in_headers</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a345"></a>        <span class="src-var">$in_headers </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a346"></a>      <span class="src-sym">}</span></li>
<li><a name="a347"></a>      <span class="src-comm"># ok we need to break this line up into several</span></li>
<li><a name="a348"></a>      <span class="src-comm"># smaller lines</span></li>
<li><a name="a349"></a>      <span class="src-key">while</span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">) </span>&gt; <span class="src-var">$max_line_length</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a350"></a>        <span class="src-var">$pos </span>= <a href="http://www.php.net/strrpos">strrpos</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$max_line_length</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-str">&quot; &quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a351"></a>&nbsp;</li>
<li><a name="a352"></a>        <span class="src-comm"># Patch to fix DOS attack</span></li>
<li><a name="a353"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$pos</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a354"></a>          <span class="src-var">$pos </span>= <span class="src-var">$max_line_length </span>- <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a355"></a>        <span class="src-sym">}</span></li>
<li><a name="a356"></a>&nbsp;</li>
<li><a name="a357"></a>        <span class="src-var">$lines_out</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$pos</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a358"></a>        <span class="src-var">$line </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span><span class="src-var">$pos </span>+ <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a359"></a>        <span class="src-comm"># if we are processing headers we need to</span></li>
<li><a name="a360"></a>        <span class="src-comm"># add a LWSP-char to the front of the new line</span></li>
<li><a name="a361"></a>        <span class="src-comm"># rfc 822 on long msg headers</span></li>
<li><a name="a362"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$in_headers</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a363"></a>          <span class="src-var">$line </span>= <span class="src-str">&quot;\t&quot; </span>. <span class="src-var">$line</span><span class="src-sym">;</span></li>
<li><a name="a364"></a>        <span class="src-sym">}</span></li>
<li><a name="a365"></a>      <span class="src-sym">}</span></li>
<li><a name="a366"></a>      <span class="src-var">$lines_out</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$line</span><span class="src-sym">;</span></li>
<li><a name="a367"></a>&nbsp;</li>
<li><a name="a368"></a>      <span class="src-comm"># now send the lines to the server</span></li>
<li><a name="a369"></a>      <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">,</span><span class="src-var">$line_out</span><span class="src-sym">) </span>= <span class="src-sym">@</span><a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$lines_out</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a370"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$line_out</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">)</span></li>
<li><a name="a371"></a>        <span class="src-sym">{</span></li>
<li><a name="a372"></a>          <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line_out</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot;.&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a373"></a>            <span class="src-var">$line_out </span>= <span class="src-str">&quot;.&quot; </span>. <span class="src-var">$line_out</span><span class="src-sym">;</span></li>
<li><a name="a374"></a>          <span class="src-sym">}</span></li>
<li><a name="a375"></a>        <span class="src-sym">}</span></li>
<li><a name="a376"></a>        <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-var">$line_out </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a377"></a>      <span class="src-sym">}</span></li>
<li><a name="a378"></a>    <span class="src-sym">}</span></li>
<li><a name="a379"></a>&nbsp;</li>
<li><a name="a380"></a>    <span class="src-comm"># ok all the message data has been sent so lets get this</span></li>
<li><a name="a381"></a>    <span class="src-comm"># over with aleady</span></li>
<li><a name="a382"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-str">&quot;.&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a383"></a>&nbsp;</li>
<li><a name="a384"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a385"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a386"></a>&nbsp;</li>
<li><a name="a387"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a388"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a389"></a>    <span class="src-sym">}</span></li>
<li><a name="a390"></a>&nbsp;</li>
<li><a name="a391"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a392"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a393"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;DATA not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a394"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a395"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a396"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a397"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a398"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a399"></a>      <span class="src-sym">}</span></li>
<li><a name="a400"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a401"></a>    <span class="src-sym">}</span></li>
<li><a name="a402"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a403"></a>  <span class="src-sym">}</span></li>
<li><a name="a404"></a>&nbsp;</li>
<li><a name="a405"></a>  <span class="src-doc">/**</span></li>
<li><a name="a406"></a><span class="src-doc">   * Expand takes the name and asks the server to list all the</span></li>
<li><a name="a407"></a><span class="src-doc">   * people who are members of the _list_. Expand will return</span></li>
<li><a name="a408"></a><span class="src-doc">   * back and array of the result or false if an error occurs.</span></li>
<li><a name="a409"></a><span class="src-doc">   * Each value in the array returned has the format of:</span></li>
<li><a name="a410"></a><span class="src-doc">   *     [ &lt;full-name&gt; &lt;sp&gt; ] &lt;path&gt;</span></li>
<li><a name="a411"></a><span class="src-doc">   * The definition of &lt;path&gt; is defined in rfc 821</span></li>
<li><a name="a412"></a><span class="src-doc">   *</span></li>
<li><a name="a413"></a><span class="src-doc">   * Implements rfc 821: EXPN &lt;SP&gt; &lt;string&gt; &lt;CRLF&gt;</span></li>
<li><a name="a414"></a><span class="src-doc">   *</span></li>
<li><a name="a415"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a416"></a><span class="src-doc">   * SMTP CODE FAILURE: 550</span></li>
<li><a name="a417"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,502,504,421</span></li>
<li><a name="a418"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a419"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">array</span></li>
<li><a name="a420"></a><span class="src-doc">   */</span></li>
<li><a name="a421"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodExpand">Expand</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a422"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a423"></a>&nbsp;</li>
<li><a name="a424"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a425"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a426"></a>            <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Expand() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a427"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a428"></a>    <span class="src-sym">}</span></li>
<li><a name="a429"></a>&nbsp;</li>
<li><a name="a430"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;EXPN &quot; </span>. <span class="src-var">$name </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a431"></a>&nbsp;</li>
<li><a name="a432"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a433"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a434"></a>&nbsp;</li>
<li><a name="a435"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a436"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a437"></a>    <span class="src-sym">}</span></li>
<li><a name="a438"></a>&nbsp;</li>
<li><a name="a439"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a440"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a441"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;EXPN not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a442"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a443"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a444"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a445"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a446"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a447"></a>      <span class="src-sym">}</span></li>
<li><a name="a448"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a449"></a>    <span class="src-sym">}</span></li>
<li><a name="a450"></a>&nbsp;</li>
<li><a name="a451"></a>    <span class="src-comm"># parse the reply and place in our array to return to user</span></li>
<li><a name="a452"></a>    <span class="src-var">$entries </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">,</span><span class="src-var">$rply</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a453"></a>    <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">,</span><span class="src-var">$l</span><span class="src-sym">) </span>= <span class="src-sym">@</span><a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$entries</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a454"></a>      <span class="src-var">$list</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$l</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a455"></a>    <span class="src-sym">}</span></li>
<li><a name="a456"></a>&nbsp;</li>
<li><a name="a457"></a>    <span class="src-key">return </span><span class="src-var">$list</span><span class="src-sym">;</span></li>
<li><a name="a458"></a>  <span class="src-sym">}</span></li>
<li><a name="a459"></a>&nbsp;</li>
<li><a name="a460"></a>  <span class="src-doc">/**</span></li>
<li><a name="a461"></a><span class="src-doc">   * Sends the HELO command to the smtp server.</span></li>
<li><a name="a462"></a><span class="src-doc">   * This makes sure that we and the server are in</span></li>
<li><a name="a463"></a><span class="src-doc">   * the same known state.</span></li>
<li><a name="a464"></a><span class="src-doc">   *</span></li>
<li><a name="a465"></a><span class="src-doc">   * Implements from rfc 821: HELO &lt;SP&gt; &lt;domain&gt; &lt;CRLF&gt;</span></li>
<li><a name="a466"></a><span class="src-doc">   *</span></li>
<li><a name="a467"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a468"></a><span class="src-doc">   * SMTP CODE ERROR  : 500, 501, 504, 421</span></li>
<li><a name="a469"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a470"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a471"></a><span class="src-doc">   */</span></li>
<li><a name="a472"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodHello">Hello</a><span class="src-sym">(</span><span class="src-var">$host</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a473"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a474"></a>&nbsp;</li>
<li><a name="a475"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a476"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a477"></a>            <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Hello() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a478"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a479"></a>    <span class="src-sym">}</span></li>
<li><a name="a480"></a>&nbsp;</li>
<li><a name="a481"></a>    <span class="src-comm"># if a hostname for the HELO was not specified determine</span></li>
<li><a name="a482"></a>    <span class="src-comm"># a suitable one to send</span></li>
<li><a name="a483"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$host</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a484"></a>      <span class="src-comm"># we need to determine some sort of appopiate default</span></li>
<li><a name="a485"></a>      <span class="src-comm"># to send to the server</span></li>
<li><a name="a486"></a>      <span class="src-var">$host </span>= <span class="src-str">&quot;localhost&quot;</span><span class="src-sym">;</span></li>
<li><a name="a487"></a>    <span class="src-sym">}</span></li>
<li><a name="a488"></a>&nbsp;</li>
<li><a name="a489"></a>    <span class="src-comm">// Send extended hello first (RFC 2821)</span></li>
<li><a name="a490"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">SendHello</span><span class="src-sym">(</span><span class="src-str">&quot;EHLO&quot;</span><span class="src-sym">, </span><span class="src-var">$host</span><span class="src-sym">))</span></li>
<li><a name="a491"></a>    <span class="src-sym">{</span></li>
<li><a name="a492"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">SendHello</span><span class="src-sym">(</span><span class="src-str">&quot;HELO&quot;</span><span class="src-sym">, </span><span class="src-var">$host</span><span class="src-sym">))</span></li>
<li><a name="a493"></a>          <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a494"></a>    <span class="src-sym">}</span></li>
<li><a name="a495"></a>&nbsp;</li>
<li><a name="a496"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a497"></a>  <span class="src-sym">}</span></li>
<li><a name="a498"></a>&nbsp;</li>
<li><a name="a499"></a>  <span class="src-doc">/**</span></li>
<li><a name="a500"></a><span class="src-doc">   * Sends a HELO/EHLO command.</span></li>
<li><a name="a501"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a502"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a503"></a><span class="src-doc">   */</span></li>
<li><a name="a504"></a>  <span class="src-key">function </span><span class="src-id">SendHello</span><span class="src-sym">(</span><span class="src-var">$hello</span><span class="src-sym">, </span><span class="src-var">$host</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a505"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">, </span><span class="src-var">$hello </span>. <span class="src-str">&quot; &quot; </span>. <span class="src-var">$host </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a506"></a>&nbsp;</li>
<li><a name="a507"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a508"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a509"></a>&nbsp;</li>
<li><a name="a510"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a511"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a512"></a>    <span class="src-sym">}</span></li>
<li><a name="a513"></a>&nbsp;</li>
<li><a name="a514"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a515"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a516"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-var">$hello </span>. <span class="src-str">&quot; not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a517"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a518"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a519"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a520"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a521"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a522"></a>      <span class="src-sym">}</span></li>
<li><a name="a523"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a524"></a>    <span class="src-sym">}</span></li>
<li><a name="a525"></a>&nbsp;</li>
<li><a name="a526"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">helo_rply </span>= <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a527"></a>&nbsp;</li>
<li><a name="a528"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a529"></a>  <span class="src-sym">}</span></li>
<li><a name="a530"></a>&nbsp;</li>
<li><a name="a531"></a>  <span class="src-doc">/**</span></li>
<li><a name="a532"></a><span class="src-doc">   * Gets help information on the keyword specified. If the keyword</span></li>
<li><a name="a533"></a><span class="src-doc">   * is not specified then returns generic help, ussually contianing</span></li>
<li><a name="a534"></a><span class="src-doc">   * A list of keywords that help is available on. This function</span></li>
<li><a name="a535"></a><span class="src-doc">   * returns the results back to the user. It is up to the user to</span></li>
<li><a name="a536"></a><span class="src-doc">   * handle the returned data. If an error occurs then false is</span></li>
<li><a name="a537"></a><span class="src-doc">   * returned with $this-&gt;error set appropiately.</span></li>
<li><a name="a538"></a><span class="src-doc">   *</span></li>
<li><a name="a539"></a><span class="src-doc">   * Implements rfc 821: HELP [ &lt;SP&gt; &lt;string&gt; ] &lt;CRLF&gt;</span></li>
<li><a name="a540"></a><span class="src-doc">   *</span></li>
<li><a name="a541"></a><span class="src-doc">   * SMTP CODE SUCCESS: 211,214</span></li>
<li><a name="a542"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,502,504,421</span></li>
<li><a name="a543"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a544"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a545"></a><span class="src-doc">   */</span></li>
<li><a name="a546"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodHelp">Help</a><span class="src-sym">(</span><span class="src-var">$keyword</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a547"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># to avoid confusion</span></li>
<li><a name="a548"></a>&nbsp;</li>
<li><a name="a549"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a550"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a551"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Help() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a552"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a553"></a>    <span class="src-sym">}</span></li>
<li><a name="a554"></a>&nbsp;</li>
<li><a name="a555"></a>    <span class="src-var">$extra </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a556"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$keyword</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a557"></a>      <span class="src-var">$extra </span>= <span class="src-str">&quot; &quot; </span>. <span class="src-var">$keyword</span><span class="src-sym">;</span></li>
<li><a name="a558"></a>    <span class="src-sym">}</span></li>
<li><a name="a559"></a>&nbsp;</li>
<li><a name="a560"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;HELP&quot; </span>. <span class="src-var">$extra </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a561"></a>&nbsp;</li>
<li><a name="a562"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a563"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a564"></a>&nbsp;</li>
<li><a name="a565"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a566"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a567"></a>    <span class="src-sym">}</span></li>
<li><a name="a568"></a>&nbsp;</li>
<li><a name="a569"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">211 </span>&amp;&amp; <span class="src-var">$code </span>!= <span class="src-num">214</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a570"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a571"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;HELP not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a572"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a573"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a574"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a575"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a576"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a577"></a>      <span class="src-sym">}</span></li>
<li><a name="a578"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a579"></a>    <span class="src-sym">}</span></li>
<li><a name="a580"></a>&nbsp;</li>
<li><a name="a581"></a>    <span class="src-key">return </span><span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a582"></a>  <span class="src-sym">}</span></li>
<li><a name="a583"></a>&nbsp;</li>
<li><a name="a584"></a>  <span class="src-doc">/**</span></li>
<li><a name="a585"></a><span class="src-doc">   * Starts a mail transaction from the email address specified in</span></li>
<li><a name="a586"></a><span class="src-doc">   * $from. Returns true if successful or false otherwise. If True</span></li>
<li><a name="a587"></a><span class="src-doc">   * the mail transaction is started and then one or more Recipient</span></li>
<li><a name="a588"></a><span class="src-doc">   * commands may be called followed by a Data command.</span></li>
<li><a name="a589"></a><span class="src-doc">   *</span></li>
<li><a name="a590"></a><span class="src-doc">   * Implements rfc 821: MAIL &lt;SP&gt; FROM:&lt;reverse-path&gt; &lt;CRLF&gt;</span></li>
<li><a name="a591"></a><span class="src-doc">   *</span></li>
<li><a name="a592"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a593"></a><span class="src-doc">   * SMTP CODE SUCCESS: 552,451,452</span></li>
<li><a name="a594"></a><span class="src-doc">   * SMTP CODE SUCCESS: 500,501,421</span></li>
<li><a name="a595"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a596"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a597"></a><span class="src-doc">   */</span></li>
<li><a name="a598"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodMail">Mail</a><span class="src-sym">(</span><span class="src-var">$from</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a599"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a600"></a>&nbsp;</li>
<li><a name="a601"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a602"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a603"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Mail() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a604"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a605"></a>    <span class="src-sym">}</span></li>
<li><a name="a606"></a>&nbsp;</li>
<li><a name="a607"></a>    <span class="src-var">$useVerp </span>= <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_verp">do_verp</a> ? <span class="src-str">&quot;XVERP&quot; </span>: <span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a608"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;MAIL FROM:&lt;&quot; </span>. <span class="src-var">$from </span>. <span class="src-str">&quot;&gt;&quot; </span>. <span class="src-var">$useVerp </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a609"></a>&nbsp;</li>
<li><a name="a610"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a611"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a612"></a>&nbsp;</li>
<li><a name="a613"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a614"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a615"></a>    <span class="src-sym">}</span></li>
<li><a name="a616"></a>&nbsp;</li>
<li><a name="a617"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a618"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a619"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;MAIL not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a620"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a621"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a622"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a623"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a624"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a625"></a>      <span class="src-sym">}</span></li>
<li><a name="a626"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a627"></a>    <span class="src-sym">}</span></li>
<li><a name="a628"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a629"></a>  <span class="src-sym">}</span></li>
<li><a name="a630"></a>&nbsp;</li>
<li><a name="a631"></a>  <span class="src-doc">/**</span></li>
<li><a name="a632"></a><span class="src-doc">   * Sends the command NOOP to the SMTP server.</span></li>
<li><a name="a633"></a><span class="src-doc">   *</span></li>
<li><a name="a634"></a><span class="src-doc">   * Implements from rfc 821: NOOP &lt;CRLF&gt;</span></li>
<li><a name="a635"></a><span class="src-doc">   *</span></li>
<li><a name="a636"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a637"></a><span class="src-doc">   * SMTP CODE ERROR  : 500, 421</span></li>
<li><a name="a638"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a639"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a640"></a><span class="src-doc">   */</span></li>
<li><a name="a641"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodNoop">Noop</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a642"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a643"></a>&nbsp;</li>
<li><a name="a644"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a645"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a646"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Noop() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a647"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a648"></a>    <span class="src-sym">}</span></li>
<li><a name="a649"></a>&nbsp;</li>
<li><a name="a650"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;NOOP&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a651"></a>&nbsp;</li>
<li><a name="a652"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a653"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a654"></a>&nbsp;</li>
<li><a name="a655"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a656"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a657"></a>    <span class="src-sym">}</span></li>
<li><a name="a658"></a>&nbsp;</li>
<li><a name="a659"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a660"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a661"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;NOOP not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a662"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a663"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a664"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a665"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a666"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a667"></a>      <span class="src-sym">}</span></li>
<li><a name="a668"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a669"></a>    <span class="src-sym">}</span></li>
<li><a name="a670"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a671"></a>  <span class="src-sym">}</span></li>
<li><a name="a672"></a>&nbsp;</li>
<li><a name="a673"></a>  <span class="src-doc">/**</span></li>
<li><a name="a674"></a><span class="src-doc">   * Sends the quit command to the server and then closes the socket</span></li>
<li><a name="a675"></a><span class="src-doc">   * if there is no error or the $close_on_error argument is true.</span></li>
<li><a name="a676"></a><span class="src-doc">   *</span></li>
<li><a name="a677"></a><span class="src-doc">   * Implements from rfc 821: QUIT &lt;CRLF&gt;</span></li>
<li><a name="a678"></a><span class="src-doc">   *</span></li>
<li><a name="a679"></a><span class="src-doc">   * SMTP CODE SUCCESS: 221</span></li>
<li><a name="a680"></a><span class="src-doc">   * SMTP CODE ERROR  : 500</span></li>
<li><a name="a681"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a682"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a683"></a><span class="src-doc">   */</span></li>
<li><a name="a684"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodQuit">Quit</a><span class="src-sym">(</span><span class="src-var">$close_on_error</span>=<span class="src-id">true</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a685"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so there is no confusion</span></li>
<li><a name="a686"></a>&nbsp;</li>
<li><a name="a687"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a688"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a689"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Quit() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a690"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a691"></a>    <span class="src-sym">}</span></li>
<li><a name="a692"></a>&nbsp;</li>
<li><a name="a693"></a>    <span class="src-comm"># send the quit command to the server</span></li>
<li><a name="a694"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;quit&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a695"></a>&nbsp;</li>
<li><a name="a696"></a>    <span class="src-comm"># get any good-bye messages</span></li>
<li><a name="a697"></a>    <span class="src-var">$byemsg </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a698"></a>&nbsp;</li>
<li><a name="a699"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a700"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$byemsg</span><span class="src-sym">;</span></li>
<li><a name="a701"></a>    <span class="src-sym">}</span></li>
<li><a name="a702"></a>&nbsp;</li>
<li><a name="a703"></a>    <span class="src-var">$rval </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a704"></a>    <span class="src-var">$e </span>= <span class="src-id">null</span><span class="src-sym">;</span></li>
<li><a name="a705"></a>&nbsp;</li>
<li><a name="a706"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$byemsg</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a707"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">221</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a708"></a>      <span class="src-comm"># use e as a tmp var cause Close will overwrite $this-&gt;error</span></li>
<li><a name="a709"></a>      <span class="src-var">$e </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;SMTP server rejected quit command&quot;</span><span class="src-sym">,</span></li>
<li><a name="a710"></a>                 <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a711"></a>                 <span class="src-str">&quot;smtp_rply&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$byemsg</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a712"></a>      <span class="src-var">$rval </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a713"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a714"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$e</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>. <span class="src-str">&quot;: &quot; </span>.</li>
<li><a name="a715"></a>                 <span class="src-var">$byemsg </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a716"></a>      <span class="src-sym">}</span></li>
<li><a name="a717"></a>    <span class="src-sym">}</span></li>
<li><a name="a718"></a>&nbsp;</li>
<li><a name="a719"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">) </span>|| <span class="src-var">$close_on_error</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a720"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#methodClose">Close</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a721"></a>    <span class="src-sym">}</span></li>
<li><a name="a722"></a>&nbsp;</li>
<li><a name="a723"></a>    <span class="src-key">return </span><span class="src-var">$rval</span><span class="src-sym">;</span></li>
<li><a name="a724"></a>  <span class="src-sym">}</span></li>
<li><a name="a725"></a>&nbsp;</li>
<li><a name="a726"></a>  <span class="src-doc">/**</span></li>
<li><a name="a727"></a><span class="src-doc">   * Sends the command RCPT to the SMTP server with the TO: argument of $to.</span></li>
<li><a name="a728"></a><span class="src-doc">   * Returns true if the recipient was accepted false if it was rejected.</span></li>
<li><a name="a729"></a><span class="src-doc">   *</span></li>
<li><a name="a730"></a><span class="src-doc">   * Implements from rfc 821: RCPT &lt;SP&gt; TO:&lt;forward-path&gt; &lt;CRLF&gt;</span></li>
<li><a name="a731"></a><span class="src-doc">   *</span></li>
<li><a name="a732"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250,251</span></li>
<li><a name="a733"></a><span class="src-doc">   * SMTP CODE FAILURE: 550,551,552,553,450,451,452</span></li>
<li><a name="a734"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,503,421</span></li>
<li><a name="a735"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a736"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a737"></a><span class="src-doc">   */</span></li>
<li><a name="a738"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodRecipient">Recipient</a><span class="src-sym">(</span><span class="src-var">$to</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a739"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a740"></a>&nbsp;</li>
<li><a name="a741"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a742"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a743"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Recipient() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a744"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a745"></a>    <span class="src-sym">}</span></li>
<li><a name="a746"></a>&nbsp;</li>
<li><a name="a747"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;RCPT TO:&lt;&quot; </span>. <span class="src-var">$to </span>. <span class="src-str">&quot;&gt;&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a748"></a>&nbsp;</li>
<li><a name="a749"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a750"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a751"></a>&nbsp;</li>
<li><a name="a752"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a753"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a754"></a>    <span class="src-sym">}</span></li>
<li><a name="a755"></a>&nbsp;</li>
<li><a name="a756"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250 </span>&amp;&amp; <span class="src-var">$code </span>!= <span class="src-num">251</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a757"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a758"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;RCPT not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a759"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a760"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a761"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a762"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a763"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a764"></a>      <span class="src-sym">}</span></li>
<li><a name="a765"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a766"></a>    <span class="src-sym">}</span></li>
<li><a name="a767"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a768"></a>  <span class="src-sym">}</span></li>
<li><a name="a769"></a>&nbsp;</li>
<li><a name="a770"></a>  <span class="src-doc">/**</span></li>
<li><a name="a771"></a><span class="src-doc">   * Sends the RSET command to abort and transaction that is</span></li>
<li><a name="a772"></a><span class="src-doc">   * currently in progress. Returns true if successful false</span></li>
<li><a name="a773"></a><span class="src-doc">   * otherwise.</span></li>
<li><a name="a774"></a><span class="src-doc">   *</span></li>
<li><a name="a775"></a><span class="src-doc">   * Implements rfc 821: RSET &lt;CRLF&gt;</span></li>
<li><a name="a776"></a><span class="src-doc">   *</span></li>
<li><a name="a777"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a778"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,504,421</span></li>
<li><a name="a779"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a780"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a781"></a><span class="src-doc">   */</span></li>
<li><a name="a782"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodReset">Reset</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a783"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a784"></a>&nbsp;</li>
<li><a name="a785"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a786"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a787"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Reset() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a788"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a789"></a>    <span class="src-sym">}</span></li>
<li><a name="a790"></a>&nbsp;</li>
<li><a name="a791"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;RSET&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a792"></a>&nbsp;</li>
<li><a name="a793"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a794"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a795"></a>&nbsp;</li>
<li><a name="a796"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a797"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a798"></a>    <span class="src-sym">}</span></li>
<li><a name="a799"></a>&nbsp;</li>
<li><a name="a800"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a801"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a802"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;RSET failed&quot;</span><span class="src-sym">,</span></li>
<li><a name="a803"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a804"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a805"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a806"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a807"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a808"></a>      <span class="src-sym">}</span></li>
<li><a name="a809"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a810"></a>    <span class="src-sym">}</span></li>
<li><a name="a811"></a>&nbsp;</li>
<li><a name="a812"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a813"></a>  <span class="src-sym">}</span></li>
<li><a name="a814"></a>&nbsp;</li>
<li><a name="a815"></a>  <span class="src-doc">/**</span></li>
<li><a name="a816"></a><span class="src-doc">   * Starts a mail transaction from the email address specified in</span></li>
<li><a name="a817"></a><span class="src-doc">   * $from. Returns true if successful or false otherwise. If True</span></li>
<li><a name="a818"></a><span class="src-doc">   * the mail transaction is started and then one or more Recipient</span></li>
<li><a name="a819"></a><span class="src-doc">   * commands may be called followed by a Data command. This command</span></li>
<li><a name="a820"></a><span class="src-doc">   * will send the message to the users terminal if they are logged</span></li>
<li><a name="a821"></a><span class="src-doc">   * in.</span></li>
<li><a name="a822"></a><span class="src-doc">   *</span></li>
<li><a name="a823"></a><span class="src-doc">   * Implements rfc 821: SEND &lt;SP&gt; FROM:&lt;reverse-path&gt; &lt;CRLF&gt;</span></li>
<li><a name="a824"></a><span class="src-doc">   *</span></li>
<li><a name="a825"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a826"></a><span class="src-doc">   * SMTP CODE SUCCESS: 552,451,452</span></li>
<li><a name="a827"></a><span class="src-doc">   * SMTP CODE SUCCESS: 500,501,502,421</span></li>
<li><a name="a828"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a829"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a830"></a><span class="src-doc">   */</span></li>
<li><a name="a831"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodSend">Send</a><span class="src-sym">(</span><span class="src-var">$from</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a832"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a833"></a>&nbsp;</li>
<li><a name="a834"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a835"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a836"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Send() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a837"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a838"></a>    <span class="src-sym">}</span></li>
<li><a name="a839"></a>&nbsp;</li>
<li><a name="a840"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;SEND FROM:&quot; </span>. <span class="src-var">$from </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a841"></a>&nbsp;</li>
<li><a name="a842"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a843"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a844"></a>&nbsp;</li>
<li><a name="a845"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a846"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a847"></a>    <span class="src-sym">}</span></li>
<li><a name="a848"></a>&nbsp;</li>
<li><a name="a849"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a850"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a851"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;SEND not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a852"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a853"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a854"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a855"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a856"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a857"></a>      <span class="src-sym">}</span></li>
<li><a name="a858"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a859"></a>    <span class="src-sym">}</span></li>
<li><a name="a860"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a861"></a>  <span class="src-sym">}</span></li>
<li><a name="a862"></a>&nbsp;</li>
<li><a name="a863"></a>  <span class="src-doc">/**</span></li>
<li><a name="a864"></a><span class="src-doc">   * Starts a mail transaction from the email address specified in</span></li>
<li><a name="a865"></a><span class="src-doc">   * $from. Returns true if successful or false otherwise. If True</span></li>
<li><a name="a866"></a><span class="src-doc">   * the mail transaction is started and then one or more Recipient</span></li>
<li><a name="a867"></a><span class="src-doc">   * commands may be called followed by a Data command. This command</span></li>
<li><a name="a868"></a><span class="src-doc">   * will send the message to the users terminal if they are logged</span></li>
<li><a name="a869"></a><span class="src-doc">   * in and send them an email.</span></li>
<li><a name="a870"></a><span class="src-doc">   *</span></li>
<li><a name="a871"></a><span class="src-doc">   * Implements rfc 821: SAML &lt;SP&gt; FROM:&lt;reverse-path&gt; &lt;CRLF&gt;</span></li>
<li><a name="a872"></a><span class="src-doc">   *</span></li>
<li><a name="a873"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a874"></a><span class="src-doc">   * SMTP CODE SUCCESS: 552,451,452</span></li>
<li><a name="a875"></a><span class="src-doc">   * SMTP CODE SUCCESS: 500,501,502,421</span></li>
<li><a name="a876"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a877"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a878"></a><span class="src-doc">   */</span></li>
<li><a name="a879"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodSendAndMail">SendAndMail</a><span class="src-sym">(</span><span class="src-var">$from</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a880"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a881"></a>&nbsp;</li>
<li><a name="a882"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a883"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a884"></a>          <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called SendAndMail() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a885"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a886"></a>    <span class="src-sym">}</span></li>
<li><a name="a887"></a>&nbsp;</li>
<li><a name="a888"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;SAML FROM:&quot; </span>. <span class="src-var">$from </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a889"></a>&nbsp;</li>
<li><a name="a890"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a891"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a892"></a>&nbsp;</li>
<li><a name="a893"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a894"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a895"></a>    <span class="src-sym">}</span></li>
<li><a name="a896"></a>&nbsp;</li>
<li><a name="a897"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a898"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a899"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;SAML not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a900"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a901"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a902"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a903"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a904"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a905"></a>      <span class="src-sym">}</span></li>
<li><a name="a906"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a907"></a>    <span class="src-sym">}</span></li>
<li><a name="a908"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a909"></a>  <span class="src-sym">}</span></li>
<li><a name="a910"></a>&nbsp;</li>
<li><a name="a911"></a>  <span class="src-doc">/**</span></li>
<li><a name="a912"></a><span class="src-doc">   * Starts a mail transaction from the email address specified in</span></li>
<li><a name="a913"></a><span class="src-doc">   * $from. Returns true if successful or false otherwise. If True</span></li>
<li><a name="a914"></a><span class="src-doc">   * the mail transaction is started and then one or more Recipient</span></li>
<li><a name="a915"></a><span class="src-doc">   * commands may be called followed by a Data command. This command</span></li>
<li><a name="a916"></a><span class="src-doc">   * will send the message to the users terminal if they are logged</span></li>
<li><a name="a917"></a><span class="src-doc">   * in or mail it to them if they are not.</span></li>
<li><a name="a918"></a><span class="src-doc">   *</span></li>
<li><a name="a919"></a><span class="src-doc">   * Implements rfc 821: SOML &lt;SP&gt; FROM:&lt;reverse-path&gt; &lt;CRLF&gt;</span></li>
<li><a name="a920"></a><span class="src-doc">   *</span></li>
<li><a name="a921"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a922"></a><span class="src-doc">   * SMTP CODE SUCCESS: 552,451,452</span></li>
<li><a name="a923"></a><span class="src-doc">   * SMTP CODE SUCCESS: 500,501,502,421</span></li>
<li><a name="a924"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a925"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a926"></a><span class="src-doc">   */</span></li>
<li><a name="a927"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodSendOrMail">SendOrMail</a><span class="src-sym">(</span><span class="src-var">$from</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a928"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a929"></a>&nbsp;</li>
<li><a name="a930"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a931"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a932"></a>          <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called SendOrMail() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a933"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a934"></a>    <span class="src-sym">}</span></li>
<li><a name="a935"></a>&nbsp;</li>
<li><a name="a936"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;SOML FROM:&quot; </span>. <span class="src-var">$from </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a937"></a>&nbsp;</li>
<li><a name="a938"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a939"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a940"></a>&nbsp;</li>
<li><a name="a941"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a942"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a943"></a>    <span class="src-sym">}</span></li>
<li><a name="a944"></a>&nbsp;</li>
<li><a name="a945"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a946"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a947"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;SOML not accepted from server&quot;</span><span class="src-sym">,</span></li>
<li><a name="a948"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a949"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a950"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a951"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a952"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a953"></a>      <span class="src-sym">}</span></li>
<li><a name="a954"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a955"></a>    <span class="src-sym">}</span></li>
<li><a name="a956"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a957"></a>  <span class="src-sym">}</span></li>
<li><a name="a958"></a>&nbsp;</li>
<li><a name="a959"></a>  <span class="src-doc">/**</span></li>
<li><a name="a960"></a><span class="src-doc">   * This is an optional command for SMTP that this class does not</span></li>
<li><a name="a961"></a><span class="src-doc">   * support. This method is here to make the RFC821 Definition</span></li>
<li><a name="a962"></a><span class="src-doc">   * complete for this class and __may__ be implimented in the future</span></li>
<li><a name="a963"></a><span class="src-doc">   *</span></li>
<li><a name="a964"></a><span class="src-doc">   * Implements from rfc 821: TURN &lt;CRLF&gt;</span></li>
<li><a name="a965"></a><span class="src-doc">   *</span></li>
<li><a name="a966"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250</span></li>
<li><a name="a967"></a><span class="src-doc">   * SMTP CODE FAILURE: 502</span></li>
<li><a name="a968"></a><span class="src-doc">   * SMTP CODE ERROR  : 500, 503</span></li>
<li><a name="a969"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a970"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a971"></a><span class="src-doc">   */</span></li>
<li><a name="a972"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodTurn">Turn</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a973"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;This method, TURN, of the SMTP &quot;</span>.</li>
<li><a name="a974"></a>                                    <span class="src-str">&quot;is not implemented&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a975"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a976"></a>      echo <span class="src-str">&quot;SMTP -&gt; NOTICE: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a977"></a>    <span class="src-sym">}</span></li>
<li><a name="a978"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a979"></a>  <span class="src-sym">}</span></li>
<li><a name="a980"></a>&nbsp;</li>
<li><a name="a981"></a>  <span class="src-doc">/**</span></li>
<li><a name="a982"></a><span class="src-doc">   * Verifies that the name is recognized by the server.</span></li>
<li><a name="a983"></a><span class="src-doc">   * Returns false if the name could not be verified otherwise</span></li>
<li><a name="a984"></a><span class="src-doc">   * the response from the server is returned.</span></li>
<li><a name="a985"></a><span class="src-doc">   *</span></li>
<li><a name="a986"></a><span class="src-doc">   * Implements rfc 821: VRFY &lt;SP&gt; &lt;string&gt; &lt;CRLF&gt;</span></li>
<li><a name="a987"></a><span class="src-doc">   *</span></li>
<li><a name="a988"></a><span class="src-doc">   * SMTP CODE SUCCESS: 250,251</span></li>
<li><a name="a989"></a><span class="src-doc">   * SMTP CODE FAILURE: 550,551,553</span></li>
<li><a name="a990"></a><span class="src-doc">   * SMTP CODE ERROR  : 500,501,502,421</span></li>
<li><a name="a991"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a992"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">int </span></li>
<li><a name="a993"></a><span class="src-doc">   */</span></li>
<li><a name="a994"></a>  <span class="src-key">function </span><a href="../PHPMailer/SMTP.html#methodVerify">Verify</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a995"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-id">null</span><span class="src-sym">; </span><span class="src-comm"># so no confusion is caused</span></li>
<li><a name="a996"></a>&nbsp;</li>
<li><a name="a997"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a998"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a999"></a>              <span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;Called Verify() without being connected&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1000"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1001"></a>    <span class="src-sym">}</span></li>
<li><a name="a1002"></a>&nbsp;</li>
<li><a name="a1003"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-str">&quot;VRFY &quot; </span>. <span class="src-var">$name </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1004"></a>&nbsp;</li>
<li><a name="a1005"></a>    <span class="src-var">$rply </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1006"></a>    <span class="src-var">$code </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1007"></a>&nbsp;</li>
<li><a name="a1008"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">2</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1009"></a>      echo <span class="src-str">&quot;SMTP -&gt; FROM SERVER:&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a> . <span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a1010"></a>    <span class="src-sym">}</span></li>
<li><a name="a1011"></a>&nbsp;</li>
<li><a name="a1012"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$code </span>!= <span class="src-num">250 </span>&amp;&amp; <span class="src-var">$code </span>!= <span class="src-num">251</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1013"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error </span>=</li>
<li><a name="a1014"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;error&quot; </span>=&gt; <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">VRFY</span> <span class="src-id">failed</span> <span class="src-id">on</span> <span class="src-id">name</span> '<span class="src-var">$name</span>'</span><span class="src-str">&quot;</span><span class="src-sym">,</span></li>
<li><a name="a1015"></a>              <span class="src-str">&quot;smtp_code&quot; </span>=&gt; <span class="src-var">$code</span><span class="src-sym">,</span></li>
<li><a name="a1016"></a>              <span class="src-str">&quot;smtp_msg&quot; </span>=&gt; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$rply</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1017"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1018"></a>        echo <span class="src-str">&quot;SMTP -&gt; ERROR: &quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error</span><span class="src-sym">[</span><span class="src-str">&quot;error&quot;</span><span class="src-sym">] </span>.</li>
<li><a name="a1019"></a>                 <span class="src-str">&quot;: &quot; </span>. <span class="src-var">$rply </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a1020"></a>      <span class="src-sym">}</span></li>
<li><a name="a1021"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1022"></a>    <span class="src-sym">}</span></li>
<li><a name="a1023"></a>    <span class="src-key">return </span><span class="src-var">$rply</span><span class="src-sym">;</span></li>
<li><a name="a1024"></a>  <span class="src-sym">}</span></li>
<li><a name="a1025"></a>&nbsp;</li>
<li><a name="a1026"></a>  <span class="src-doc">/*****************************************************************</span></li>
<li><a name="a1027"></a><span class="src-doc">   *                       INTERNAL FUNCTIONS                       *</span></li>
<li><a name="a1028"></a><span class="src-doc">   ******************************************************************/</span></li>
<li><a name="a1028"></a>&nbsp;</li>
<li><a name="a1029"></a>&nbsp;</li>
<li><a name="a1030"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1031"></a><span class="src-doc">   * Read in as many lines as possible</span></li>
<li><a name="a1032"></a><span class="src-doc">   * either before eof or socket timeout occurs on the operation.</span></li>
<li><a name="a1033"></a><span class="src-doc">   * With SMTP we can tell if we have more lines to read if the</span></li>
<li><a name="a1034"></a><span class="src-doc">   * 4th character is '-' symbol. If it is a space then we don't</span></li>
<li><a name="a1035"></a><span class="src-doc">   * need to read anything else.</span></li>
<li><a name="a1036"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1037"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1038"></a><span class="src-doc">   */</span></li>
<li><a name="a1039"></a>  <span class="src-key">function </span><span class="src-id">get_lines</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1040"></a>    <span class="src-var">$data </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1041"></a>    <span class="src-key">while</span><span class="src-sym">(</span><span class="src-var">$str </span>= <span class="src-sym">@</span><a href="http://www.php.net/fgets">fgets</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp_conn</span><span class="src-sym">,</span><span class="src-num">515</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1042"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">4</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1043"></a>        echo <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">SMTP</span> -&gt; <span class="src-id">get_lines</span>(): \$<span class="src-id">data</span> <span class="src-id">was</span> \&quot;<span class="src-var">$data</span>\&quot;</span><span class="src-str">&quot; </span>.</li>
<li><a name="a1044"></a>                 <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a1045"></a>        echo <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">SMTP</span> -&gt; <span class="src-id">get_lines</span>(): \$<span class="src-id">str</span> <span class="src-id">is</span> \&quot;<span class="src-var">$str</span>\&quot;</span><span class="src-str">&quot; </span>.</li>
<li><a name="a1046"></a>                 <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a1047"></a>      <span class="src-sym">}</span></li>
<li><a name="a1048"></a>      <span class="src-var">$data </span>.= <span class="src-var">$str</span><span class="src-sym">;</span></li>
<li><a name="a1049"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$do_debug">do_debug</a> &gt;= <span class="src-num">4</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1050"></a>        echo <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">SMTP</span> -&gt; <span class="src-id">get_lines</span>(): \$<span class="src-id">data</span> <span class="src-id">is</span> \&quot;<span class="src-var">$data</span>\&quot;</span><span class="src-str">&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/SMTP.html#var$CRLF">CRLF</a><span class="src-sym">;</span></li>
<li><a name="a1051"></a>      <span class="src-sym">}</span></li>
<li><a name="a1052"></a>      <span class="src-comm"># if the 4th character is a space then we are done reading</span></li>
<li><a name="a1053"></a>      <span class="src-comm"># so just break the loop</span></li>
<li><a name="a1054"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot; &quot;</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-key">break</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1055"></a>    <span class="src-sym">}</span></li>
<li><a name="a1056"></a>    <span class="src-key">return </span><span class="src-var">$data</span><span class="src-sym">;</span></li>
<li><a name="a1057"></a>  <span class="src-sym">}</span></li>
<li><a name="a1058"></a>&nbsp;</li>
<li><a name="a1059"></a><span class="src-sym">}</span></li>
<li><a name="a1060"></a>&nbsp;</li>
<li><a name="a1061"></a>&nbsp;</li>
<li><a name="a1062"></a> <span class="src-php">?&gt;</span></li>
</ol></pre>
</div>
	<p class="notes" id="credit">
		Documentation generated on Thu, 02 Apr 2009 21:19:51 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</body>
</html>